<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>不迷失-Admin 菜单管理</title>
    <div th:replace="head"></div>
</head>

<body class="hold-transition skin-blue sidebar-mini ">
<div class="wrapper">

    <div th:replace="header"></div>
    <div th:replace="sidebar"></div>

    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">

        <!-- Main content -->
        <section class="content">

            <div class="row">
                <div class="col-md-12">
                    <!-- Horizontal Form -->
                    <div class="box box-info">
                        <div class="box-header with-border">
                            <h3 class="box-title">菜单管理</h3>
                        </div>
                        <!-- /.box-header -->
                        <!-- form start -->
                        <form class="form-horizontal" th:action="@{${api}}" method="post">
                            <div class="box-body">
                                <div class="form-group">
                                    <label for="inputEmail3" class="col-sm-2 control-label">id</label>

                                    <div class="col-sm-10">
                                        <input type="text" name="id" th:value="${menu}? ${menu.id}"
                                               th:readonly="${menu}?true:false" class="form-control" id="inputEmail3"
                                               placeholder=""
                                               required="required" maxlength="50"/>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label for="inputEmail3" class="col-sm-2 control-label">label</label>

                                    <div class="col-sm-10">
                                        <input type="text" name="label" th:value="${menu}? ${menu.label}"
                                               class="form-control" id="inputEmail3" placeholder=""
                                               required="required" maxlength="30"/>
                                    </div>
                                </div>

                                <!--<div class="form-group">-->
                                <!--<label for="inputEmail3" class="col-sm-2 control-label">类型</label>-->

                                <!--<div class="col-sm-10">-->
                                <!--<input type="text" name="type" class="form-control" id="inputEmail3" placeholder=""-->
                                <!--required="required">-->
                                <!--</div>-->
                                <!--</div>-->

                                <div class="form-group">
                                    <label for="inputEmail3" class="col-sm-2 control-label">url</label>

                                    <div class="col-sm-10">
                                        <input type="text" name="url" th:value="${menu}? ${menu.url}"
                                               class="form-control" id="inputEmail3" placeholder=""
                                               required="required" maxlength="225"/>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label for="inputEmail3" class="col-sm-2 control-label">排序</label>

                                    <div class="col-sm-10">
                                        <input type="number" name="order" th:value="${menu}? ${menu.order} : 10"
                                               class="form-control" id="inputEmail3" placeholder=""
                                        />
                                        <input type="hidden" name="path"
                                               th:value="${menu}? ${menu.path} : (${parentPath} ? ${parentPath} :0)"/>
                                    </div>
                                </div>

                                <br/><br/>
                            </div>
                            <!-- /.box-body -->
                            <div class="box-footer" style="text-align: center;">

                                <button type="submit" class="btn btn-info">Submit</button>
                            </div>
                            <!-- /.box-footer -->
                        </form>
                    </div>
                    <!-- /.box -->

                </div>
            </div>
            <!-- /.row -->

        </section>
        <!-- /.content -->
    </div>
    <!-- /.content-wrapper -->

    <div th:replace="footer"></div>
</div>
<!-- ./wrapper -->
<div th:replace="script"></div>

</body>
</html>